<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>京城男人帮---用户注册</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/login.css"/>
</head>
<body>
	<div id="append"></div>
	<div class="full_sc">
		<div class="head_cent head_cwo ClearFix">
			<div class="h_logo">
				<a href="{:url('home/index/index')}">
					<img src="__PUBLIC__/home/image/logo.png" width="102px" height="98px" />
				</a>
			</div>
			<div class="h_right">
				<img src="__PUBLIC__/home/image/top_center.jpg"/>
			</div>
		</div>
	</div>
	<div class="w980 ClearFix">
		<div class="logo_box ClearFix">
			<div class="login_b_l ClearFix">
				<a href="" title="出发">
					<img src="__PUBLIC__/home/image/register.jpg" alt="出发"/>
				</a>
			</div>
			<div class="login_b_r ClearFix">
				<div class="loginul ClearFix">
				    <div class="login_h2 ClearFix">
					    <h2>用户注册</h2>
					    <div class="lognrtop">
							已有账号<a href="{:url('home/user/login')}">在此登录</a>
						</div>
					</div>
				  <div class="co"> 
                    <div class="form">
                    <form id="register_form" method="post" action="register_add">
                        <div class="item">
                            <input placeholder="请输入用户名" class="itxt" autocomplete="off" tabindex="1" maxlength="11" name="u_name" id="uname" type="text"><img src="__PUBLIC__/home/image/dui.png" alt="" width="10" height="14" id="unameok" hidden>
                            <div class="err_box">
                                <div class="err_msg2" style="display: none;" id="nameid"></div>
                            </div>
                        </div>
                        <div class="item item2">
                            <input placeholder="请输入密码" tabindex="4" maxlength="20" class="itxt" name="u_pwd" id="pwd" type="password">
                            <img src="__PUBLIC__/home/image/dui.png" alt="" width="10" height="14" id="upwdok" hidden>
                            <div class="err_box">
                                <div class="err_msg2" style="display: none;" id="error_password">请输入您的密码,您的密码可能为字母、数字或符号组合</div>
                            </div>
                        </div>
                        <div class="item item2">
                            <input placeholder="请再次输入密码" class="itxt" tabindex="5" maxlength="20" name="r_u_pwd" id="rpwd" type="password"><img src="__PUBLIC__/home/image/dui.png" alt="" width="10" height="14" id="rpwdok" hidden>
                            <div class="err_box">
                                <div class="err_msg2" style="display: none;" id="error_password_confirm">请输入您的密码,您的密码可能为字母、数字或符号组合</div>
                            </div>
                        </div>
                        <div class="item item3">
                            <input placeholder="验证码" autocomplete="off" tabindex="6" maxlength="4" size="10" class="itxt itxt_yzm" name="code" id="code" type="text">


                            <div><img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}'"/></div>



                            <div class="err_box">
                                <div class="err_msg2" style="display: none;" id="error_captcha">请输入右侧验证码</div>
                            </div>
                        </div>
                        <div class="item item5">
                            <div class="login-btn">
                               <!--  <a id="loginsubmit" tabindex="7" class="btn-img btn-entry" href="javascript:;">立即注册</a> -->
                                <button type="submit" id="loginsubmit" tabindex="7" class="btn-img btn-entry" id="submit">立即注册</button>
                            </div>
                        </div>
                    </form>
                    </div>
				   </div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
<script src="__PUBLIC__/home/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
    $(document).on("blur","#uname",function(obj){
        var uname = $(this).val();
        if(uname==''){
            alert("用户名不能为空!");
            return false;
        }else{
            var reg=/^[a-z]\w{5,17}$/i
            if(reg.test(uname)){
                $("#unameok").show();
                return true;
            }else{
                alert("用户名由6-18位的字母数字下划线组成，不能由数字开头!");
                return false;
            }
        }return true;
    })
    $(document).on("blur","#pwd",function(){
        var upwd = $(this).val();
        if (upwd==''){
            alert("密码不能为空!");
            return;
        }else{
            var reg=/^\w{6,}$/;
            if (reg.test(upwd)){
                $("#upwdok").show();
                return true;
            } else{
                alert("密码长度不能少于六位!");
                return false;
            }
        }
    })
    $(document).on("blur","#rpwd",function(){
        var rpwd = $(this).val();
        var pwd = $("#pwd").val();
        if (rpwd==''){
            alert("确认密码不能为空!");
            return false;
        }else{
            if (pwd==rpwd){
                $("#rpwdok").show();
                return true;
            } else{
                alert("确认密码与密码不符!");
                return false;
            }
        }
    })
</script>
